#ifndef FILE_GENERATOR_H
#define FILE_GENERATOR_H
#include <wx/wx.h>
#include <fund.h>
#include <mainwindow.h>


wxDECLARE_EVENT(wxEVENT_COMMAND_MYHANDER_SUCCESS,wxThreadEvent);
wxDECLARE_EVENT(wxEVENT_COMMAND_MYHANDER_FAIL,wxThreadEvent);

class fileGenerator : public wxThread
{
public:
    fileGenerator(mainFrame *hander);
    ~fileGenerator();
    void setFundsPonit(std::vector<Fund> *ponit);

private:
    virtual ExitCode Entry() override;
    mainFrame *m_Hander;
    std::vector<Fund> *m_pFunds;

private:
    bool generateDbf();
    bool generateCsv();
};

#endif